Originally developed for IBM PC Compatible computers, the Basic Input/Output System (BIOS), also known as the System BIOS, is a de facto standard defining a firmware interface. The BIOS is boot firmware, designed to be the first code run by a PC when powered on. The initial function of the BIOS is to identify, test, and initialize system devices such as the video display card, hard disk, and floppy disk and other hardware. This is to prepare the machine into a known state, so that software such as an operating system stored on compatible media can be loaded, executed, and given control of the PC. This process is known as booting, or booting up, which is short for bootstrapping.
BIOS programs provide a small library of basic input/output functions that can be called to operate and control the peripherals such as the keyboard, text display functions and so forth. When a system is powered on, BIOS checks system configuration settings and loads interrupt handlers into memory addresses. Interrupt handlers are programs that act as translators between the hardware components and the operating system. For example, when a user presses a key on the keyboard, the signal is sent to the keyboard interrupt handler, which tells the processor what it is and passes it on to the operating system. Most interaction with mass storage devices in BIOS are handled using the INT13 interrupt handler. The INT instruction triggers a software interrupt. In response to the INT instruction, an interrupt handler is executed from a specified memory address; for example, the INT13 instruction causes an interrupt handler to be executed from a memory address, which is typically in the E0000h-FFFFFh region. The BIOS writes code for the interrupt handler for the INT13 instruction to the memory address in the E0000h-FFFFFh region during initial configuration of the system.
BIOS was developed for the IBM PC at a time when processors functioned in a 16-bit processor mode and addressable memory was limited to one megabyte, and the code reflected IBM PC AT hardware dependencies. Operating systems later developed for 32-bit processors began to include device drivers to handle I/O rather than rely on invoking the 16-bit runtime interface provided by BIOS. The Extensible Firmware Interface (EFI) is a specification that defines a software interface between an operating system and platform firmware. EFI defines boot services, which include text and graphical console support on various devices, bus, block, and file services, and runtime services, such as date, time, and NVRAM services. Interaction with mass storage devices in an EFI environment is handled through EFI device drivers.
Booting a system under either a traditional legacy operating system such as MS-DOS or under an EFI-aware operating system requires access to mass storage devices present in the system. During booting to a traditional legacy operating system, the access to mass storage devices has heretofore been supplied by INT13 interrupt handler code. During booting to an EFI-aware operating system, access to mass storage devices is supplied by the EFI drivers.
Since the target operating system is not known during the system firmware development, EFI firmware usually contains code to boot to both a legacy operating system using an INT13 interrupt handler and an EFI driver to boot to an EFI-aware operating system. The presence of code to implement both booting processes (INT13 handler and EFI drivers) in EFI firmware requires extra ROM space and additional space in runtime memory. Additionally, the presence of both methods (INT13 handler and EFI drivers) in EFI firmware may make the maintenance of the firmware difficult. Whenever new features need to be implemented in both the INT13 handler and the EFI drivers, the amount of work increases. In case of a problem with access to mass storage devices, additional work must be done to find whether the problem exists in both the INT13 handler and the EFI driver. A particular problem may need to be solved in both the INT13 handler and the EFI driver.